﻿namespace KingTools.CommonsHelper.Constants
{
    public class Constants
    {
        #region XML 文件操作 常量

        /// <summary>
        ///     XML 文件路径
        /// </summary>
        public const string XML_PATH = "config.xml";

        public const string XML_CACHES_PATH = "config/caches";
        public const string XML_SERVERS_PATH = "config/servers";
        public const string XML_CLEAN_URLS_PATH = "config/cleanurls";
        public const string XML_STOP_URLS_PATH = "config/stopurls";

        #endregion

        #region 缓存操作 常量

        // 清除缓存链接
        public const string CACHE_URL =
            "http://localhost:8009/game/interface/oper.do?t={0}&k={1}&g_m=gmAdmin_bojoy_global&m=removeCache";

        // 清除远程服务器缓存链接
        public const string REMOTE_CACHE_URL =
            "http://192.168.0.14:9001/game/interface/oper.do?g_m=gmAdmin_bojoy_global&m=removeCache&t={0}&k={1}";

        // 本地停服链接
        public const string LOCAL_STOP_SERVER_URL =
            "http://localhost:8009/game/interface/oper.do?g_m=gmAdmin_bojoy_global&m=shutdown&t=1";

        // 远程服务器停服链接
        public const string REMOTE_SERVER_STOP_URL =
            "http://192.168.0.14:9001/game/interface/oper.do?g_m=gmAdmin_bojoy_global&m=shutdown&t=1";

        // 清除本地全部缓存
        public const string LOCAL_CLEAN_CACHE_URL =
            "http://localhost:8009/game/interface/oper.do?g_m=gmAdmin_bojoy_global&m=clearCacheAll";

        // 清除远程服务器全部缓存
        public const string REMOTE_CLEAN_CACHE_URL =
            "http://192.168.0.14:9001/game/interface/oper.do?g_m=gmAdmin_bojoy_global&m=clearCacheAll";

        // 重新加载基础数据缓存
        public const string RELOAD_DICT_CACHE_URL =
            "http://localhost:8009/game/interface/oper.do?g_m=gmAdmin_bojoy_global&m=reloadDict&t=-1";

        // 14 服务器，重新加载基础数据缓存
        public const string REMOTE_RELOAD_DICT_CACHE_URL =
            "http://192.168.0.14:9001/game/interface/oper.do?g_m=gmAdmin_bojoy_global&m=reloadDict&t=-1";

        // 同步测试服活动到 14 服务器
        public const string SYNC_INTERNET_TEST_PLOY_URL =
            "http://192.168.0.14:9001/game/interface/oper.do?m=notifyPloy&g_m=gmAdmin_bojoy_global&serverid=30010000";

        #endregion

        #region 静态常量

        /// <summary>
        ///     重新连接状态
        /// </summary>
        public static bool isConnect = true;

        /// <summary>
        ///     是否发送验证串
        /// </summary>
        public static bool isVerify = true;

        /// <summary>
        ///     是否登录
        /// </summary>
        public static bool isLogin = true;

        /// <summary>
        ///     Server Send Client EncryKey byte[]
        /// </summary>
        public static byte[] encryptKey = null;

        /// <summary>
        ///     对比用户名
        /// </summary>
        public static string USER_NAME = "";

        /// <summary>
        ///     重连
        /// </summary>
        public static bool RECONNECTION = false;

        #endregion
    }
}